<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>

<!--下面是shopping-cart.jsp页面中 <div id="productList"> 内部的东西-->
<s:if test="#session.shopCart.amount == 0">
	对不起，您的购物车中还没有商品！<a href="${ctx}">我要去买&gt;&gt;</a>
	<input type="hidden" id="total_amount" value="0"/>
</s:if>
<s:else>
<input type="hidden" id="total_amount" value="<s:property value='#session.shopCart.amount'/>"/>
<table class='Table' cellpadding='0' cellspacing='0' width='100%'
	id='CartTb'>
	<tr class='align_Center Thead'>
		<td width='7%' style='height: 30px'>商品编号</td>
		<td>商品名称</td>
		<td width='10%'>商品单价</td>
		<td width='8%'>商品类型</td>
		<td width='8%'>状态</td>
		<td width='9%'>商品数量</td>
		<td width='7%'>删除商品</td>
	</tr>
    <s:iterator value="#session.shopCart.buyList" status="itStatus">
	<tr class='align_Center'>
		<td style='padding: 5px 0 5px 0;'><s:property value="productId"/></td>
		<td class='align_Left'>
		<span>
			<a target='_blank' href='#' onclick='this.blur();'><s:property value="productName"/></a>
		</span>
		</td>
		<td><span class='price'>￥<s:property value="unitPrice"/></span></td>
		<td><s:property value="productType"/></td>
		<td><s:property value="status"/></td>
		<td>
		<a href='#none' title='减一' onclick="changeBar('-','<s:property value="productId"/>')" style='margin-right: 2px;'>
			<img style='display: inline' src='${ctx}/images/shop-img/bag_close.gif' border='none' />
		</a>
		<input type='text' name='txtChange12602' maxlength='4' style='width: 30px'
			   onkeydown='if(event.keyCode == 13) event.returnValue = false'
			   value='<s:property value="quantity"/>' 
			   onchange="changeCount('<s:property value="productId"/>',this);" />
			
		<a href='#none' title='加一' onclick="changeBar('+','<s:property value="productId"/>')" style='margin-left: 2px;'>
			<img style='display: inline' src='${ctx}/images/shop-img/bag_open.gif' border='none' />
		</a>
		</td>
		<td><a href='#' id='btn_del_177174' onclick="deleteCart('<s:property value="productId"/>');">删除</a></td>
	</tr>
	</s:iterator>
	
<!--
	<tr class='align_Center'>
		<td style='padding: 5px 0 5px 0;'>207827</td>
		<td class='align_Left'>
			<span><a target='_blank' href='#' onclick='this.blur();'>
					派丽蒙PARIM2010年新款爱恋布拉格时尚太阳镜3301B1
				  </a>
			</span>
		</td>
		<td><span class='price'>￥149.00</span></td>
		<td>￥0.00</td>
		<td>0</td>
		<td>
		<a href='#none' title='减一' onclick="changeBar('-','207827',this,'sku')" style='margin-right: 2px;'>
			<img style='display: inline' src='http://www.360buy.com/purchase/skin/images/bag_close.gif' border='none' />
		</a>
		<input type='text' id='btn_cha_207827' name='txtChange207827' maxlength='4' style='width: 30px'
			onkeydown='if(event.keyCode == 13) event.returnValue = false'
			value='1' onfocus='changeTxtOnFocus(this);'
			onblur="changeProductCount('207827',this);" />
		<input type='hidden' name='hidChange207827' value='1' />
		<a href='#none' title='加一' onclick="changeBar('+','207827',this,'sku')" style='margin-left: 2px;'>
			<img style='display: inline' src='http://www.360buy.com/purchase/skin/images/bag_open.gif' border='none' />
		</a>
		</td>
		<td>
			<a href='#none' id='btn_del_207827' onclick="removeProductOnShoppingCart('207827', this);">删除</a>
		</td>
	</tr>
-->

	<tr>
		<td class='align_Right Tfoot' colspan='7' style='height: 30px'>
		车数量：<s:property value="#session.shopCart.amount"/>本&nbsp;&nbsp;&nbsp;原始金额：￥<s:property value="#session.shopCart.totalCost"/>元
		<span style='font-size: 14px;padding-left:10px;padding-right:10px;'><b>应付商品金额(不含运费)：<span class='price' id='cartBottom_price'>￥<s:property value="#session.shopCart.totalCost"/></span>元</b></span>
		</td>
	</tr>
</table>
</s:else>